import { getToken } from '../../src/utils'
import { Navigate } from 'react-router-dom'
function Authrouter({ children }){
    const token = getToken()
    if(token){
        return <>{children}</>
    }else{
        return <Navigate to={"/login"} replace/>
    }
    
}
export default Authrouter